---
layout: erblayout
title: I'm an ERB Page
page_var: 123
---

One two three: <%= page.data[:page_var] * 10 %>

<%= liquid_render "test_component", param: "Liquid FTW!" %>

Oats, <%= array_to_sentence_string ["peas", "beans", "barley"] %> grow.

  <%= markdownify do %>
      ## I'm a header!

      * Yay!
      <%= "* Nifty!" %>
  <% end %>

<% test_capturing = capture do %>
  This is how <%= "#{"cap"}turing" %> works!
<% end %>

<%= test_capturing.reverse %>

<p class="<%= class_map blank: !''.empty?, truthy: true, 'more-truthy' => 'yes' == 'yes', falsy: nil, 'more-falsy' => 'no' == 'yes' %>">classes!</p>

<%= render RubyComponent.new %>

<%= render(Card.new(title: "I'm a card", footer: "I'm a footer")) do |c| %>
  <% c.slot :image do %>
    <img src="test.jpg" />
  <% end %>
  <p>I'm the body of the <%= c.kind %></p>
<% end %>

<%= render(Card.new(title: "Nope", footer: "CANCEL!")) do %>
  Canceled!
<% end %>

<%= render Card::CardSection.new(blurb: "blurb contents") %>

<%= render (Nested.new(level: 1)) do %>Level 1<% end %>

<%= render Example::OverrideComponent.new %>

<%= render "testing/universal", original_extname: "erb" %>

===
<%= test_block_helpers do |item| %>
<%= item[:value] %>
<% end %>
---

<%= render DsdComponent.new do %>
  <p>Default slot content.</p>
<% end %>

<%== "<em>This is an unescaped expression & it shouldn't be escaped</em>" %>
